#ifndef __CROLE_H_232012__
#define __CROLE_H_232012__

#include "IRole.h"

class CMagicEx;
class CRole : public IRole
{
public:
	CRole(unsigned int idRole);
	virtual ~CRole();

	virtual void Init();
	virtual int GetMana(void) { return m_nMana; }
	virtual int GetPosX(void) { return m_nPosX; }
	virtual int GetPosY(void) { return m_nPosY; }
	virtual int GetLife(void) { return m_nLife; }
	virtual unsigned int GetID() { return m_unID; }
	
	virtual bool MoveTo(unsigned int unDestX, unsigned int unDestY);
	virtual void BeDamage(int nAmount);
	virtual bool IsAlive() { return m_nLife > 0; }

	virtual void Broadcast(const char* pszMsg);
	virtual void OnTimer();
	virtual void MagicAttack(unsigned short usMagicType, unsigned int idTarget);

	virtual CMagicEx* GetMagicExPtr(){return m_pMagicEx;}
private:
	unsigned int m_unID;
	int m_nMana;
	int m_nPosX;
	int m_nPosY;
	int m_nLife;
	CMagicEx* m_pMagicEx;
};

#endif //__CROLE_H_232012__